<div class="cat_head">
	<div class="cat_head_strip"></div>
		<?php 
			echo CHtml::link( 
				'<i>+</i>Добавить сообщество',
				$this->createUrl('create'),
				array('class'=>'green_btn r_m')
			);
		?>
	<div class="cat_head_h t">
		<p class="cat_head_h_txt">
			<span>
			<?php echo count($model); ?>
			</span> сообщест
		</p>
	</div>
</div>
<?php foreach ($model as $key => $value) : ?>
	<div class="f_list_item">
		<a href="<?php echo Yii::app()->createUrl('groups/view', array('group'=>$value->id));?>" class="f_list_img">
			<?php echo isset($value->avatar_info->name) ? $this->material_image(0, $value->avatar_info->name, '100', 'groups/'. $value->id . '/' . 0) : $this->material_image(0, 'fuck', '100', 'groups/'. $value->id . '/' . 0); ?>
		</a>
		<div class="f_list_txt no_l">
			<div class="f_list_name">
				<a href="<?php echo Yii::app()->createUrl('groups/view', array('group'=>$value->id));?>">
					<?php echo CHtml::encode($value->name); ?>
				</a>
			</div>
			<div class="f_list_data">
				<p><?php echo CHtml::encode( CSelect::item($value->approve, "GroupType") ); ?> группа</p>
				<p>
					<i>
						<?php echo CHtml::encode($value->countSubscribers); ?>
					</i> 
					участников
				</p>
			</div>
		</div>
	</div>
<?php endforeach; ?>